package com.pingan.haofang.searchcloud.web.index.form;

import com.pingan.haofang.searchcloud.web.metadata.form.MetadataFieldForm;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 保存索引form
 *
 * @author baojie371
 * @date 17/5/4
 * @since 1.0.0
 */
@ApiModel(description = "索引form")
public class IndexInfoForm {

    @NotNull(message = "index.basicInfo.illegal")
    @ApiModelProperty("索引基本信息")
    @Valid
    private IndexForm basicInfo;

    @NotNull(message = "index.fields.illegal")
    @ApiModelProperty(value = "索引字段")
    @Valid
    private List<MetadataFieldForm> fields;

    public IndexForm getBasicInfo() {
        return basicInfo;
    }

    public void setBasicInfo(IndexForm basicInfo) {
        this.basicInfo = basicInfo;
    }

    public List<MetadataFieldForm> getFields() {
        return fields;
    }

    public void setFields(List<MetadataFieldForm> fields) {
        this.fields = fields;
    }
}
